﻿// Cấu hình routeProvider
app.config(function ($routeProvider) {
    $routeProvider.when('/index', {
        templateUrl: '/vws/cln/index.html',
        controller: 'IndexCtrl'
    });
    $routeProvider.when('/about', {
        templateUrl: '/vws/cln/about.html',
        controller: 'AboutCtrl'
    });
    $routeProvider.when('/items', {
        templateUrl: '/vws/cln/items/list.html',
        controller: 'ItemsListCtrl'
    });
    $routeProvider.when('/items/search/:ItemSearchName', {
        templateUrl: '/vws/cln/items/list.html',
        controller: 'ItemsListCtrl'
    });
    $routeProvider.when('/items/list/:CategorySearchName?/:TypeSearchName?', {
        templateUrl: '/vws/cln/items/list.html',
        controller: 'ItemsListCtrl'
    });
    $routeProvider.when('/items/other', {
        templateUrl: '/vws/cln/items/list.html',
        controller: 'ItemsListCtrl'
    });
    $routeProvider.when('/items/detail/:ItemSearchName', {
        templateUrl: '/vws/cln/items/detail.html',
        controller: 'ItemsDetailCtrl'
    });
    $routeProvider.when('/gallery', {
        templateUrl: '/vws/cln/gallery.html',
        controller: 'GalleryCtrl'
    });
    $routeProvider.when('/contact', {
        templateUrl: '/vws/cln/contact.html',
        controller: 'ContactCtrl'
    });
    $routeProvider.otherwise({ redirectTo: '/index' });
});